package com.flexycore.iphone.launch;


import com.flexycore.iphone.uikit.UIApplication;
import com.flexycore.iphone.uikit.UIApplicationDelegate;
import com.flexycore.iphone.uikit.UINavigationController;
import com.flexycore.iphone.uikit.UIScreen;
import com.flexycore.iphone.uikit.UIViewController;
import com.flexycore.iphone.uikit.UIWindow;
import com.flexycore.iphone.view.MyView;


public class Launcher extends UIApplicationDelegate {

	private UINavigationController nav;
	
	public Launcher()
	{
	}
	
	public void applicationDidFinishLaunching(UIApplication app)
	{ 
		UIWindow window = new UIWindow();
		window.initWithFrame(UIScreen.mainScreen().bounds());

		nav = new UINavigationController();
		
		UIViewController ctr = new UIViewController();
		ctr.init();
		ctr.setTitle("Page control");
		ctr.setView(new MyView());
		
		nav.initWithRootViewController(ctr);
		
		window.addSubview(nav.view());
		window.makeKeyAndVisible();
	}
	
}
